

function ctrlInitArrowFormWyswig(context, selector, data){
		
		var context = $(selector);
		$(function(){
			//alert(data.path);
			//CKEDITOR_BASEPATH = data.path;
			//setTimeout(function(){
			
			var tmpInit = function(){
				var settings = {};
				settings = initWyswig();
				
				settings["toolbar_"+data.toolbar] = window["wyswig_toolbar_" + data.toolbar]; 
				settings.toolbar = data.toolbar;
				
				if(data.toolbar != "default")
					settings.removePlugins = 'elementspath';
				
				settings.resize_enabled  = false;
				
				
					
				
				settings.contentsCss = data.style_file;
				settings.templates_files = [ data.templates ];
		
				
				try{
					//alert(ctrlWyswigEditors[context.attr("id")]);
					//console.dir(ctrlWyswigEditors[context.attr("id")]);
					if(context && ctrlWyswigEditors[context.attr("id")] != undefined && ctrlWyswigEditors[context.attr("id")] != null){
						  
							//ctrlWyswigEditors[context.attr("id")].remove();
						  //delete CKEDITOR.instances[context.attr("id")];
					}

				}catch(ex){
					alert(ex);
				}
				
				if(context.css('height') && context.css('height') != "auto"){
					settings.height = context.css('height');
					var tmp = parseInt(settings.height.replace("px", ''));
					settings.height = tmp - window["wyswig_toolbar_" + data.toolbar+"_height"];
				}else{
					settings.height = context.parents("div").innerHeight()-window["wyswig_toolbar_" + data.toolbar+"_height"];
				}
				if(context.css('width') && context.css('width') != "0px"){
					settings.width = context.css('width');
					
				}else{
					settings.width = context.parent().innerWidth();
				}
					
				if($.browser.opera && settings.width)
					settings.width+=12;
				
				if($.browser.safari && settings.width)
					settings.width+=200;
				
				if($.browser.opera && settings.height)
					settings.height-= 9;
				
				if($.browser.msie && settings.height)
					settings.height-= 18;
				
				if($.browser.safari && settings.height)
					settings.height-= 10;
				
				
				if(settings.resize_enabled == false)
					settings.height+= 21;
				
				if(settings.height)
					settings.height+="px";
				
				
					setTimeout(function(){
						if(!(context && ctrlWyswigEditors[context.attr("id")] != undefined && ctrlWyswigEditors[context.attr("id")] != null))
							ctrlWyswigEditors[context.attr("id")] = CKEDITOR.replace( context[0], settings );
					},500);
				
				
			
			}
			if($.browser.opera || $.browser.safari){
				if($(context[0]).is(":visible"))
					setTimeout(tmpInit, 20);
				else
					setTimeout(tmpInit, 20);
			}else{
				if($(context[0]).is(":visible"))
					tmpInit();
				else
					setTimeout(tmpInit, 20);
			}
		
		});
		//evt.editor.execCommand( 'maximize' );
		//}, 10);
	
}